﻿using System.Collections.Generic;
using System.ServiceProcess;
using System.Text;

namespace StockDataCollecter
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点:服务安装方法
        /// cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
        ///InstallUtil.exe D:\software\StockCollector\StockDataCollecter.exe
        /// InstallUtil.exe/u D:\software\StockCollector\StockDataCollecter.exe
        /// </summary>
        static void Main()
        {
            ServiceBase[] ServicesToRun;

            // 同一进程中可以运行多个用户服务。若要将
            // 另一个服务添加到此进程中，请更改下行以
            // 创建另一个服务对象。例如，
            //
            //   ServicesToRun = new ServiceBase[] {new Service1(), new MySecondUserService()};
            //
            ServicesToRun = new ServiceBase[] { new StockDataCollectService() };

            ServiceBase.Run(ServicesToRun);
        }

        //create table conf_stock
        //(
        //  STOCKCODE VARCHAR2(255),
        //  STOCKNAME VARCHAR2(255),
        //  MARKET_ID VARCHAR2(255),
        //  AREA_ID   VARCHAR2(255)
        //);

        //create table perf_stock
        //(
        //  STOCKCODE            VARCHAR2(255),
        //  STOCKNAME            VARCHAR2(255),
        //  STOCKTIME            VARCHAR2(255),
        //  LASTPRICE            NUMBER(10,2),
        //  INFLATIONFALLNUMBER  NUMBER(10,2),
        //  LOWESTPRICE          NUMBER(10,2),
        //  HIGHESTPRICE         NUMBER(10,2),
        //  INFLATIONFALLPERCENT NUMBER(10,4),
        //  CJL                  NUMBER(10),
        //  CJE                  NUMBER(10),
        //  JMJIN                NUMBER(10,2),
        //  JMJOUT               NUMBER(10,2),
        //  DELEGATEPERCENT      NUMBER(10,4),
        //  MIN1                 NUMBER(10,2),
        //  MIN2                 NUMBER(10,2),
        //  MIN3                 NUMBER(10,2),
        //  MIN4                 NUMBER(10,2),
        //  MIN5                 NUMBER(10,2),
        //  MOUT1                NUMBER(10,2),
        //  MOUT2                NUMBER(10,2),
        //  MOUT3                NUMBER(10,2),
        //  MOUT4                NUMBER(10,2),
        //  MOUT5                NUMBER(10,2),
        //  STARTTIME            VARCHAR2(255)
        //);

        //create table perf_stock_d
        //(
        //  STOCKCODE            VARCHAR2(255),
        //  STOCKNAME            VARCHAR2(255),
        //  STARTTIME            VARCHAR2(255),
        //  YESTERDAYENDPRICE    NUMBER(10,2),
        //  TODAYSTARTPRICE      NUMBER(10,2),
        //  LOWESTPRICE          NUMBER(10,2),
        //  HIGHESTPRICE         NUMBER(10,2),
        //  INFLATIONFALLNUMBER  NUMBER(10,2),
        //  INFLATIONFALLPERCENT NUMBER(10,4),
        //  CJL                  NUMBER(10),
        //  CJE                  NUMBER(10)
        //);

        //create table stock_area
        //(
        //  AREA_ID   VARCHAR2(255),
        //  AREA_NAME VARCHAR2(255)
        //);


        //create table stock_market
        //(
        //  MARKET_ID   VARCHAR2(255),
        //  MARKET_NAME VARCHAR2(255)
        //);


        //alter table CONF_STOCK add constraint CONFPK primary key (STOCKCODE);
        //alter table perf_stock add constraint perfPK primary key (STOCKCODE,STOCKTIME);
        //alter table perf_stock_d add constraint perfPKd primary key (STOCKCODE,STARTTIME);
        //alter table stock_area add constraint arak primary key (AREA_ID);
        //alter table stock_market add constraint mk primary key (MARKET_ID);


    }
}